<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
    </head>
    <body>
        <div id="app">
            <com></com>
        </div>
        <div id="app2">
            <com></com>
        </div>
        <template id="com">
            <div>
                <button>{{content}}</button>
            </div>
        </template>
        <script src="../vue.js"></script>
        <script>
            // Vue.component('组件的名称','组件的配置项')
            let com = {
                template: '#com',
                data() {
                    return {
                        content: '按钮',
                    };
                },
            };
            Vue.component('com', com);
            let vm = new Vue({
                // components: {
                //     com,
                // }
            }).$mount('#app');
            new Vue({ el: '#app2' });
        </script>
    </body>
</html>
